import 'package:flutter/material.dart';
import 'package:sprintf/sprintf.dart';

String getMemoryImageCache() {
  return "${sprintf("%.1f", [
        PaintingBinding.instance.imageCache.currentSizeBytes / 1024 / 1024
      ])}M";
}

void clearImageCache() {
  PaintingBinding.instance.imageCache.clear();
  PaintingBinding.instance.imageCache.clearLiveImages();
}
